package singleton.lazyloading_multithreading;

public class Singleton {

    private static Singleton instance = null;

    private Singleton() {
    }

    ;

    public Singleton getInstance() {
        if (instance == null) {
            /**
             * @Question 该如何确定锁定哪个对象？
             */
            synchronized (Singleton.class) {
                instance = new Singleton();
            }
        }
        return instance;
    }
}
